import http from "../utils/http";

export const reqLogin = (code) => {
  return http.request({ url: `/weixin/wxLogin/${code}`, method: "GET" });
};

export const reqUserInfo = () => {
  return http.request({ url: `/weixin/getuserInfo`, method: "GET" });
};

export const reqUploadFile = (filePath, name) => {
  return http.upload("/fileUpload", filePath, name);
};

export const reqSave = (userInfo) => {
  return http.request({
    url: "/weixin/updateUser",
    method: "POST",
    data: userInfo,
  });
};
